package com.example.location.service;

import com.example.location.bean.User;
import com.example.location.dao.UserJpa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserJpa userJpa;
    public List<User> getAllusers(){
        return userJpa.findAll();
    }
    public int add (User user){
        userJpa.save(user);
        return 1;
    }
}
